Skip to content

docs: correct npx package resolution guidance - #25673

Open
MinhPhuong-hub wants to merge 1 commit into
OpenAPITools:masterfrom
MinhPhuong-hub:patch-1
Open

MinhPhuong-hub wants to merge 1 commit into
OpenAPITools:masterfrom
MinhPhuong-hub:patch-1

Conversation

@MinhPhuong-hub

@MinhPhuong-hub MinhPhuong-hub commented Nov 14, 2026 •

Copy link
Copy Markdown

Summary

Update the npx package resolution guidance in docs/installation.md.

The previous explanation incorrectly stated that npx prioritizes globally installed commands over project-local packages. This does not reflect the behavior documented for modern npm versions.

Changes

  • Clarify that npx uses the project-local @openapitools/openapi-generator-cli package when available.
  • Explain that npm may fetch the package into its cache when it is not available locally.
  • Clarify how to invoke a globally installed CLI directly.
  • Leave the existing installation and generation commands unchanged.

Validation

Verified package resolution behavior on Windows using Node.js 24.22.1 and npm/npx 11.19.1.

  • Global package: prettier@2.8.8
  • Local package: prettier@3.1.0
  • npx prettier --version returned 3.1.0.
  • npx --no-install prettier --version also returned 3.1.0.

The observed behavior is consistent with the [official npm documentation](https://docs.npmjs.com/cli/v11/commands/npx/).

This is a documentation-only change. The OpenAPI Generator CLI was not tested directly, and the project build and sample generation were not run.


Summary by cubic

Corrects the npx package resolution guidance in docs/installation.md to match modern npm behavior.

The old instructions claimed npx prefers globally installed commands over project-local packages. The new guidance states that npx uses the local @openapitools/openapi-generator-cli when available, may fetch the package into npm's cache otherwise, and shows how to invoke a globally installed CLI directly. This is a documentation-only change; installation and generation commands are unchanged.

Written for commit 3748a14. Summary will update on new commits.

View guided diff

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

View guided diff | Re-trigger cubic

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant